Product Code Database
Example Keywords: stitch -hat $43-124
barcode-scavenger
   » » Wiki: React Native
Tag Wiki 'React Native'.
Tag

React Native is an open-source software framework developed by (formerly Facebook Inc.). It is used to develop applications for Android, , , , , , Windows and UWP by enabling developers to use the React framework along with native platform capabilities. It is used to develop Android and iOS applications at Facebook, Microsoft, and Shopify. It is also being used to develop virtual reality applications at Oculus.


History
In 2012 commented, "The biggest mistake we made as a was betting too much on as opposed to native". Using HTML5 for 's mobile version resulted in an unstable that retrieved data slowly. He promised would soon deliver a better mobile experience.

Inside Facebook, Jordan Walke developed software that generated elements for from a background thread, which became the basis for the React web framework. They decided to organize an internal to perfect this in order to be able to build with this technology.

In 2015, after months of development, released the first version for the React JavaScript Configuration. During a technical talk, Christopher Chedeau explained that Facebook was already using React Native in production for its Group App and its Ads Manager App.


Implementation
The working principles of React Native are virtually identical to React except that React Native does not manipulate the DOM via the Virtual DOM. It runs in a background process (which interprets the written by the developers) directly on the end-device and communicates with the native platform via over an asynchronous and bridge.

React components wrap existing native code and interact with native APIs via React's declarative UI paradigm and . is often used over in modern React Native applications due to its increased .

While React Native styling has a similar syntax to , it does not use or . Instead, messages from the thread are used to manipulate native views. Using plugins, can also be used with React Native.

React Native is also available for both and , which is currently maintained by .


Hello World example
A Hello, World program in React Native looks like this:

import { AppRegistry, Text, View, Button } from 'react-native'; import React from 'react';

const HelloWorldApp = () => {

 const [count, setCount] = React.useState(0);
     

 const incrementCount = () => {
   setCount((prevCount) => prevCount + 1);
 };
     

 return (
   
     Hello world!
     {count}
     
};

export default HelloWorldApp;

AppRegistry.registerComponent('HelloWorld', () => HelloWorldApp);


TypeScript example
In TypeScript, a counter component looks like this: import { Button, Text, View } from "react-native"; import React from "react";

interface CounterProps {

   title: string; // Required prop
   baseNumber?: number; // Optional prop
     
}

const Counter: React.FC = ({ title, baseNumber }) => {

   const [count, setCount] = React.useState(baseNumber || 0);
     

   const incrementCount = (): void => setCount((prevCount) => prevCount + 1);
     

   return (
       
           {count}
           
       
   );
     
};


See also


Citations

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs